Skip to content

[CHORE]: Fix jupyter deps issue - #5694

Merged
emilykl merged 5 commits into
mainfrom
fix-jupyter-deps-issue
Aug 7, 2026
Merged

[CHORE]: Fix jupyter deps issue#5694
emilykl merged 5 commits into
mainfrom
fix-jupyter-deps-issue

Conversation

@emilykl

@emilykl emilykl commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Issue

There's a CI failure on main caused by the Jupyter Python dependencies used to build the Jupyterlab extension.

The ultimate failure seems to be caused by a recent change in jupyterlab-builder which doesn't properly account for the || specifier in package.json deps.

However, the reason we're hitting that code path in the first place is due to this warning, and the special handling added as a result:

@jupyterlab/core-meta was not found in node_modules. This extension declares
a devDependency on @jupyterlab/builder@4.3.6 || ^3.6.8, which is a legacy package
so core-meta 4.3.6 || ^3.6.8 will be used instead of the latest release. 
To avoid this, add @jupyter/builder as a devDependency instead of @jupyterlab/builder.

Description of change

  • Use "@jupyter/builder": "^1.2.2", rather than "@jupyterlab/builder": "^4.3.6 || ^3.6.8", in package.json
  • Use the command jupyter-builder build rather than jupyter labextension build
  • Use jupyter-builder rather than jupyter in the [dev_build] extra in pyproject.toml
    • Thanks to the above changes, now only jupyter-builder is required to build the extension, and it's over an order of magnitude smaller than jupyterlab
    • Add jupyter to the [dev_optional] extra since it's still required for some of the tests
    • Rebuild JavaScript artifacts
    • Update package-lock.json and uv.lock

Testing strategy

  • Check out this PR
  • Create a new venv
  • Run:
uv sync --extra dev_build
cd js
npm ci && npm run build

Make sure the extension builds without error.

Then, verify that the built extension works in Jupyter:

  • Run uv pip install -e .
  • Run jupyter notebook
  • In the Jupyter web interface, create a new notebook and paste the following code:
## FIRST CELL: TESTING FIG.SHOW()
import plotly
import plotly.graph_objects as go

fig = go.Figure(data=go.Scatter(x=[1, 2, 3, 4], y=[1, 3, 2, 4]))
fig.show()  # Figure should render in notebook

## SECOND CELL: TESTING FIGUREWIDGET
import plotly
import plotly.graph_objects as go

print(plotly.__version__)  # Make sure version is correct
fig = go.Figure(data=go.Scatter(x=[1, 2, 3, 4], y=[1, 3, 2, 4]))
figure_widget = go.FigureWidget(fig)
figure_widget  # Figure should render in notebook

Make sure both figures render in the notebook.

Guidelines

@emilykl
emilykl merged commit de4f21b into main Aug 7, 2026
25 checks passed
@emilykl
emilykl deleted the fix-jupyter-deps-issue branch August 7, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants